//
//  JHHomeViewController.swift
//  JHWeiBo
//
//  Created by qujiahong on 2019/3/21.
//  Copyright © 2019 iOS_July. All rights reserved.
//

import UIKit

class JHHomeViewController: JHBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

    }
    
    override func setupUI() {//重写父类方法，不能写在分类里，且父类方法需要@objc修饰
        super.setupUI()
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "好友", style: .plain, target: self, action: #selector(showFrends))
    }
    
    // MARK: - 显示好友
    @objc private func showFrends() {
        //view.backgroundColor = UIColor.cz_random()
        print(#function)
        let vc = JHDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
        
    }

}

//
//// MARK: - 重写UI
//extension JHHomeViewController {
//    override func setupUI() {
//        super.setupUI()
//
////        navigationItem.leftBarButtonItem = UIBarButtonItem
//    }
//}
